package com.liam.design.factory.drinkFactory;

import com.liam.design.factory.drink.Drink;

public class DrinkFactory {

    public Drink getDrink(String calssName){
        try {
            Drink drink = (Drink) Class.forName(calssName).newInstance();
            return drink;
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (IllegalAccessException e) {
            e.printStackTrace();
        } catch (InstantiationException e) {
            e.printStackTrace();
        }
        return null;
    }


}
